import React, { Component } from "react";
import Test from "./components/Test"
export default class App extends Component {
  state = {
    count:0,
  }
  render() {
   
    return (
      <div>
        <h1>test组件的生命周期</h1>
        <button
          onClick={() => {
            this.setState({
              count: this.state.count + 1,
            });
          }}
        >
          {this.state.count}
        </button>
        <hr />
        {this.state.count <=3  && <Test></Test>}
      </div>
    );
  }
  
}
